|
![](/i/fill.gif) |
I don't know whether these are bugs or not but...
1) This code won't work:
#include "functions.inc"
#declare dim = <30,15,20>
isosurface {
function {f_rounded_box (x,y,z,1,dim.x,dim.y,dim.z)}
accuracy 10^-2
max_gradient 2
contained_by {box {-dim, dim}}
pigment {rgb 1}
}
camera {location <0,100,-300> look_at 0}
light_source {<500,500,-500> rgb 1.5}
The workaround is to write as follows:
#local dimx=dim.x;
#local dimy=dim.y;
#local dimz=dim.z;
[...] function {f_rounded_box (x,y,z,1,dimx,dimy,dimz)}
2) This code won't work too:
#include "functions.inc"
#declare dim = <30,15,20>
#local dimx=dim.x;
#local dimy=dim.y;
#local dimz=dim.z;
#declare RS=seed(0);
isosurface {
function {f_rounded_box (x,y,z,1+rand(RS),dimx,dimy,dimz)}
accuracy 10^-2
max_gradient 2
contained_by {box {-dim, dim}}
pigment {rgb 1}
}
camera {location <0,100,-300> look_at 0}
light_source {<500,500,-500> rgb 1.5}
the workaround is the same:
#include "functions.inc"
#declare RS=seed(0);
#local rand_rad=rand(RS);
[...] function {f_rounded_box (x,y,z,1+rand_rad,dimx,dimy,dimz)}
Ok, what am I missing?
--
Jonathan.
Home: http://digilander.iol.it/jrgpov
Post a reply to this message
|
![](/i/fill.gif) |